// ignore_for_file: dangling_library_doc_comments, slash_for_doc_comments
import 'package:json_annotation/json_annotation.dart';

import '../../../common_code/models/base_model.dart';

part 'home_tab_classify_model.g.dart';

/*** 
 * @Author: Zhong
 * @Date: 2025-08-13 16:27:54
 * @LastEditors: Zhong zhongxiaodong@eenet.com
 * @LastEditTime: 2025-08-13 16:34:38
 * @FilePath: /wan_android_flutter/lib/module_code/home/models/home_tab_classify_model.dart
 * @Description: 
 */

@JsonSerializable(explicitToJson: true)
class HomeTabClassifyModel extends BaseModel {
  List<HomeTabClassifyDataModel>? data;

  HomeTabClassifyModel({
    required super.errorCode,
    required super.errorMsg,
    this.data,
  });

  factory HomeTabClassifyModel.fromJson(Map<String, dynamic> json) =>
      _$HomeTabClassifyModelFromJson(json);

  Map<String, dynamic> toJson() => _$HomeTabClassifyModelToJson(this);
}

@JsonSerializable()
class HomeTabClassifyDataModel {
  int? courseId;
  int? id;
  String? name;
  int? parentChapterId;
  int? type;

  HomeTabClassifyDataModel({
    this.courseId,
    this.id,
    this.name,
    this.parentChapterId,
    this.type,
  });

  factory HomeTabClassifyDataModel.fromJson(Map<String, dynamic> json) =>
      _$HomeTabClassifyDataModelFromJson(json);

  Map<String, dynamic> toJson() => _$HomeTabClassifyDataModelToJson(this);
}
